﻿@model PetaPoco.Page<ZhongheCms.Models.GswViewMemberHelper>
@{
	
    Layout = "~/Views/Shared/_LayoutWebsite.cshtml";
    string jobstate = "";
    var fp = Model.CurrentPage - 1;

    var np = Model.CurrentPage + 1;     
}
@section head
{
    <link href="/assets/sunjob/css/table.css" rel="stylesheet" />
    
  <style type="text/css">
    #pages{
	margin:10px auto 0;
}
#pages a{
	color:#666;
}
.pages{
	line-height:28px;
	height:28px;
	border:1px solid #eee; 
	background:#fbfbfb;
}
.pages a, .pages  span.selected, .pages  b.selected{
	display:inline-block;
	height:28px; 
	padding:0 14px;
	border-right:1px solid #eee; 
	font-family:Tahoma; 
	font-weight:bold;
}
.pages a.selected,.pages a:hover{
	color:#f60;
}
.pages a.next,.pages a.up{
	padding:0 30px;
}
.pages span.selected,.pages b.selected{
	color:#f60;
}
.pages a.disabled{ 
	cursor: default; 
	color:#ccc
}
.pages a.disabled:hover{
	text-decoration:none
}


-->
</style>
}
<div class="fix gWrapper">
    <div class="breakcrumb">
        <a href="/">首页</a>&nbsp;&gt;&nbsp;
        <a href="/SunJob/SchoolHelp">乐帮一族</a>
    </div>
    <div class="house_search" style="border:1px solid #ddd;">
                
               
                <dl><dd>类别：<a href="/SunJob/SchoolHelp/0" >不限</a>
                   
                         
                     <a href="/SunJob/SchoolHelp/0?p=供应">供应</a>
                     <a href="/SunJob/SchoolHelp/0?p=需求">需求</a>
                        <a href="/SunJob/SchoolHelp/0?p=招聘">招聘</a>
                        <a href="/SunJob/SchoolHelp/0?p=求职">求职</a>
                        <a href="/SunJob/SchoolHelp/0?p=培训">培训</a>
                        <a href="/SunJob/SchoolHelp/0?p=交友">交友</a>
                   </dd></dl>
               
              
            </div>
    <div id="content">

        <table >
            <thead>
                <tr>
                    <th>发布日期</th>

                    <th>类别</th>
                    <th>编号</th>
                    <th style="width: 40%">内容</th>
                    <th>截止日期</th>
                            
                    <th>抢单</th>
                </tr>
            </thead>
            <tbody>
                @foreach (var item in Model.Items)
                {
                           
                    <tr>
                        <td>@item.PubDate.ToShortDateString()</td>
                        <td>@item.HelpType</td>
                        <td>@item.HelpNo</td>
                        <td style="text-align: left">@Html.Raw(item.HelpTitle)</td>
                        <td>@item.EndDate.ToShortDateString()</td>
                             
                        <td><a href="/SunJob/SchoolHelpOrder/@item.Id" target="_blank" class="ask"><span style="color: red">我要抢单</span></a></td>
                    </tr>
                }



            </tbody>
        </table>

    </div>
              @if (Model.TotalPages > 1)
        {
              <div id="pages">


                

            <div class="pages">
                
                <a href="/SunJob/SchoolHelp/0?pageIndex=1">首页</a>
                @if (Model.CurrentPage - 1 > 0)
                {
                    <a href="/SunJob/SchoolHelp/0?pageIndex=@fp">上一页</a>    
                }
                 @for (int i = 1; i <= Model.TotalPages; i++)
                 {
                     if (i == Model.CurrentPage)
                     {
                         <span class="selected">@i</span>
                     }
                     else
                     {
                          <a href="/SunJob/SchoolHelp/0?pageIndex=@i">@i</a>
                     }
                 }
            
                @if (Model.CurrentPage + 1 <= Model.TotalPages)
                {
                     <a href="/SunJob/SchoolHelp/0?pageIndex=@np">下一页</a>    
                }
                
               <a href="/SunJob/SchoolHelp/0?pageIndex=@Model.TotalPages">尾页</a>
            </div>


            </div>
        }
      
              
</div>
@section footer
{
    
    <script type="text/javascript">

        $(document).ready(function () {
            // $('.ask').jConfirmAction({ question: "你确认要抢单吗？", yesAnswer: "是", cancelAnswer: "否" });
            $('.ask').click(function (e) {

                e.preventDefault();
                thisHref = $(this).attr('href');

                if (confirm('你确认要抢单吗?')) {
                    window.location = thisHref;
                }

            });
        });

	</script>
}
